import java.util.LinkedList;
import java.util.Queue;

/**
 * @Author 12629
 * @Date 2022/3/19 8:12
 * @Description：
 */
public class TestDemo {


    public static void main(String[] args) {
        MinStack minStack = new MinStack();
        minStack.push(1);
        minStack.push(2);
        System.out.println(minStack.top()); //2
        System.out.println(minStack.getMin());//1
        minStack.pop();//把2弹出去
        System.out.println(minStack.getMin());//1
        System.out.println(minStack.top());//1
    }


    public static void main2(String[] args) {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        System.out.println(myQueue.poll());//1
        System.out.println(myQueue.peek());//2
    }
    public static void main1(String[] args) {
        LinkedList<Integer> linkedList = new LinkedList<>();
        Queue<Integer> queue = new LinkedList<>();

        queue.offer(1);
        queue.offer(2);
        queue.offer(3);//入队列

        System.out.println(queue.poll());//1
        System.out.println(queue.peek());//2

    }
}
